Interactive Data Visualization

Row

Absent Record Analysis

Days

Absent by Age Group

146

AVg Absent by age group

F0

27

F1

46

F2

40

F3

33

Row

Absent by Age Group

Most Absent by Age Group

lrn vs Days

Row

boxplot for most absent in days

Data Table

Pivot Table

Summary

Column

Max Absent Days

81

Average Absent Days

16.46

Column

Report

  • This is a report on 146 days of observation of students absenteeism.

  • The average absent days 16.4589041.

This report was generated on April 21, 2021.

About Report

Created by: DINESH RAJAN R A

Confidential: HIGHLY!

---
title: "20CSEG06"
author: "DINESH RAJAN R A"
output: 
  flexdashboard::flex_dashboard:
    orientation: columns
    vertical_layout: fill
    social: ["twitter","facebook","menu"]
    source_code: embed
---

```{r setup, include=FALSE}
library(flexdashboard)
library(knitr)
library(DT)
library(rpivotTable)
library(ggplot2)
library(plotly)
library(dplyr)
library(openintro)
library(ggvis)
library(MASS)
```

```{r}
data(quine)
```

```{r}
mycolors=c("blue","#FFC125","darkgreen","darkorange")
```

Interactive Data Visualization
=====================================

Row
-------------------------------------

### Absent Record Analysis

```{r}
valueBox(paste("Days"),
         color = "warning")
```

### Absent by Age Group

```{r}
valueBox(length(quine$Age),
         icon = "fa-user")
```

### AVg Absent by age group

```{r}
gauge(round(mean(quine$Age),
            digits = 2),
            min = 0,
            max = 350,
            gaugeSectors(success = c(0, 150),
                         warning = c(150, 240),
                         danger = c(240, 350),
                         colors = c("green", "yellow", "red")))
```



### F0
```{r}
valueBox(sum(quine$Age == "F0"),
         icon = 'fa-building')
```

### F1
```{r}
valueBox(sum(quine$Age == "F1"),
         icon = 'fa-building')
```

### F2
```{r}
valueBox(sum(quine$Age == "F2"),
         icon = 'fa-building')
```

### F3
```{r}
valueBox(sum(quine$Age == "F3"),
         icon = 'fa-building')
```

Row
-------------------------------

### Absent by Age Group

```{r}
d2=quine %>%
         group_by(Age) %>%
         summarise(Days = n()) %>%
         plot_ly(x = ~Age,
                 y = ~Days,
                 color = "blue",
                 type = 'bar') %>%
layout(xaxis = list(title = "Absent By Age Group"),
yaxis = list(title = 'Days'))
d2
```

### Most Absent by Age Group

```{r}
d3=quine %>%
         group_by(Age) %>%
         summarise(Days = n()) %>%
         filter(Days>18) %>%
         plot_ly(labels = ~Age,
                 values = ~Days,
                 marker = list(colors = mycolors)) %>%
         add_pie(hole = 0.2) %>%
         layout(xaxis = list(zeroline = F,
                             showline = F,
                             showticklabels = F,
                             showgrid = F),
                yaxis = list(zeroline = F,
                             showline = F,
                             showticklabels=F,
                             showgrid=F))
d3
```

### lrn vs Days

```{r}
d4=plot_ly(quine,
              x = ~Lrn,
              y = ~Days,
              text = paste("Lrn:", quine$Lrn,
                           "Days:",
                           quine$Days),
              type = "bar") %>%
         layout(xaxis = list(title="Lrn"),
                yaxis = list(title = "Lrn vs Days"))
d4
```

Row
------------------------------------

### boxplot for most absent in days
```{r}
quine %>%
         group_by(Age) %>%
         ggvis(~Age, ~Days, fill = ~Age) %>%
         layer_boxplots()
```

Data Table
========================================

```{r}
datatable(quine,
          caption = "Absent Data",
          rownames = T,
          filter = "top",
          options = list(pageLength = 25))

```

Pivot Table
=========================================

```{r}
rpivotTable(quine,
            aggregatorName = "Count",
            cols= "Days",
            rows = "Age",
            rendererName = "Heatmap")

```

Summary {data-orientation=columns} 
===========================================

Column 
-----------------------------------

### Max Absent Days

```{r}
valueBox(max(quine$Days),
         icon = "fa-user" )
```

### Average Absent Days
```{r}
valueBox(round(mean(quine$Days),
               digits = 2),
         icon = "fa-area-chart")
```

Column
---------------------------

Report

* This is a report on `r length(quine$Days)` days of observation of students absenteeism.

* The average absent days `r mean(quine$Days)`.

This report was generated on `r format(Sys.Date(), format = "%B %d, %Y")`.

About Report
========================================

Created by: DINESH RAJAN R A

Confidential: HIGHLY!